Conversation
packages/storybook-addon-mock
🦋 Changeset detectedLatest commit: 2c63cde The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
# Conflicts: # package-lock.json
|
|
||
| ```js | ||
| mockRollupPlugin({ | ||
| interceptor: ` |
There was a problem hiding this comment.
how do we handle interceptor stuff now? e.g. for ING?
There was a problem hiding this comment.
my analyses indicated that it wasn't really used
people did import some interceptors, but they were not needed
in general both in and outside of Storybook there are easy ways to include arbitrary code to the index.html, I mean this is a convenience API, but there is a lot of other options how to achieve the same, so I think this API wasn't in the right place
| }, | ||
| ) { | ||
| return { | ||
| name: 'rollup-plugin-msw', |
There was a problem hiding this comment.
so the outputting of the service worker (and loading the sw) is now handled by the storybook addon?
There was a problem hiding this comment.
correct, in practice it was only used by Storybook
also I found this rollup plugin hard to reuse, e.g. in our app it wasn't usable due to the <base href="/different-base">, so I think it's best to remove this plugin anyway.
What I did
@web/mocks, because there was a choice of either just migration it to Storybook 9 or decoupling from Storybook., both required a major update, so I went into the 2nd approach@web/storybook-addon-mocksthanks to @GuiAmPm for his contribution in #3039